# -*- coding: utf-8 -*-

import web
import json
import db_util

urls = (
    '/(.*)', 'Hello'
)
app = web.application(urls, globals())


class Hello:
    def GET(self, name):
        web.header('Content-Type', 'text/html;charset=UTF-8')

        result = db_util.exec_sql_and_fetchall('select * from pindan_province')
        return json.dumps(result, ensure_ascii=False)


if __name__ == "__main__":
    app.run()
